"""
@author:xfb
@file:作业.py
@time:2024/5/26 20:40
"""
lst = list(range(1,31))
count = 0
lst1 = []
while len(lst) > 0:
    count += 1
    if count % 8 == 0:
        out = lst.pop(0)
        lst1.append(out)
        if len(lst1) == 8 :
            break
    else:
        lst.append(lst.pop(0))
print(lst1)